#include "hsvcolor.h"

#include <iostream>

using namespace std;

HSVColor::HSVColor() : m_h(0), m_s(0), m_v(0), m_hr(0), m_sr(0), m_vr(0)
{
}

HSVColor::HSVColor(int h, int s, int v, int hr, int sr, int vr) : m_h(h), m_s(s), m_v(v), m_hr(hr), m_sr(sr), m_vr(vr)
{
}

HSVColor::HSVColor(const HSVColor &color)
{
    m_h = color.h();
    m_s = color.s();
    m_v = color.v();

    m_hr = color.hr();
    m_sr = color.sr();
    m_vr = color.vr();
}

void HSVColor::operator=(const HSVColor &color)
                        {
    m_h = color.h();
    m_s = color.s();
    m_v = color.v();

    m_hr = color.hr();
    m_sr = color.sr();
    m_vr = color.vr();
}

void HSVColor::setHSV(int h, int s, int v)
{
    m_h = h;
    m_s = s;
    m_v = v;
}

void HSVColor::setRange(int hr, int sr, int vr)
{
    m_hr = hr;
    m_sr = sr;
    m_vr = vr;
}

void HSVColor::setHR(int hr)
{
    m_hr = hr;
}

void HSVColor::setSR(int sr)
{
    m_sr = sr;
}

void HSVColor::setVR(int vr)
{
    m_vr = vr;
}

void HSVColor::print()
{
    cout << "h: " << m_h << "+/-" << m_hr << " s: " << m_s << "+/-" << m_sr << " v: " << m_v << "+/-" << m_vr << endl;
}

void HSVColor::reset()
{
    m_h = 0;
    m_s = 0;
    m_v = 0;

    m_hr = 0;
    m_sr = 0;
    m_vr = 0;
}

